<?php 
class controller_article{
	
	public function getHome($param){

		$contentobject_structure_id = $param['id_collection'];
		
		$classContentObject = Import::loadClass('contentobject','library/contentobject/');
		$dataContent = $classContentObject->getContentAndElemByCollection(array('contentobject_structure_id'=>$contentobject_structure_id));
		
		$param['dataContent'] = $dataContent;
		
//		echo"<pre>";
//		print_r($dataContent);
//		echo"</pre>";
		
		return 'library/article/views/home.tpl.php';
	}
	
	
	public function getArticle($param){
//		echo"<pre>";
//		print_r($this);
//		echo"</pre>";

		$contentobject_structure_id = $param['id_collection'];
		
		$classContentObject = Import::loadClass('contentobject','library/contentobject/');
		$dataContent = $classContentObject->getContentAndElemByCollection(array('contentobject_structure_id'=>$contentobject_structure_id));
		
		$key = key($dataContent);
		$dataContentTmp[0] = $dataContent[$key];
		
		$param['dataContent'] = $dataContentTmp;
		
//		echo"<pre>";
//		print_r($dataContent);
//		echo"</pre>";
		
		return 'library/article/views/article.tpl.php';
	}
	
}
?>